from django.contrib import admin
from gxxx.models import *

# Register your models here.


@admin.register(Gxxx04)
class Gxxx04Admin(admin.ModelAdmin):
    list_display = ['bh', 'bjmc', 'dwh', 'zym', 'ssnj', 'xqh', 'lock', 'update_time']
    list_filter = ['dwh', 'zym', 'ssnj', 'xqh']
    search_fields = ['bh','bjmc']

    ordering = ['-update_time']

    raw_id_fields = ('zym', )

    readonly_fields = ('create_time', 'update_time')

    fieldsets = (
        ('基本信息', {"fields": ["bh", 'bjmc', 'dwh', 'zym', 'ssnj', 'xqh']}),
        ("其他信息", {
            "classes": ('collapse',),
            "fields": ['source', 'priority', 'lock', 'remarks', 'create_time', 'update_time']
        }),
    )